#pragma once

#include <boostext/typedefs.hpp>
#include <boostext/exception.hpp>

#include "exports.hpp"
#include "Key.hpp"




class ENGINE_INPUT_API Win32Key : public Key
{
private:

	// Assigned by windows
	const uint8   m_virtualKey;

	// TODO: Replace by single character and use bitmasking
	bool          m_pressed;
	bool          m_clicked;
	bool          m_down;

public:

	/**
	 * Create a Win32Key class for the virtual key, identifier by
	 * the given number.
	 */
	Win32Key(uint8 virtualKey);

	/**
	 * Get the number of the virtual key, this key represents.
	 */
	uint8 virtualKey() const;

	bool pressed() const;
	bool clicked() const;
	bool down() const;

	void setPressed(bool b);
	void setClicked(bool b);
	void setDown(bool b);



	/**
	 * Get the type enumerator for the given virtual key.
	 */
	static Type fromVirtualKey(uint32 virtualKey);
};
///////////////////////////////////////////////////////////////////////////////////////////////////
